<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<canvas id="c1" width="600" height="400" style="width: 600px; height: 400px;"></canvas>
<script>
  // 画布
  const canvas = document.getElementById('c1')
  // 画笔
  const ctx = canvas.getContext('2d')
  let coneGradient = ctx.createConicGradient(Math.PI / 2,300,200)
  coneGradient.addColorStop(0,'pink')
  coneGradient.addColorStop(1,'red')
  ctx.fillStyle = coneGradient
  ctx.fillRect(0,0,600,400)
</script>
</body>
</html>